Learn R Programming

easyRNASeq (version 2.8.2)

easyRNASeq coverage methods: Compute the coverage from a Short Read Alignment file

Description

Computes the genomic reads' coverage from a read file in bam format or any format supported by ShortRead.

Usage

## S3 method for class 'RNAseq':
fetchCoverage(obj, format = c("aln", "bam"),
  filename = character(1), filter = srFilter(), type = "SolexaExport",
  chr.sel = c(), validity.check = TRUE, chr.map = data.frame(),
  ignoreWarnings = FALSE, gapped = TRUE, paired = FALSE,
  stranded = FALSE, bp.coverage = FALSE, ...)

Arguments

obj
An RNAseq object
format
The format of the reads, one of "aln","bam". If not "bam", all the types supported by the ShortRead package are supported too.
filename
The full path of the file to use
filter
The filter to be applied when loading the data using the "aln" format
type
The type of data when using the "aln" format. See the ShortRead package.
chr.sel
A vector of chromosome names to subset the final results.
validity.check
Shall UCSC chromosome name convention be enforced
chr.map
A data.frame describing the mapping of original chromosome names towards wished chromosome names. See details.
ignoreWarnings
set to TRUE (bad idea! they have a good reason to be there) if you do not want warning messages.
gapped
Is the bam file provided containing gapped alignments?
paired
Is the bam file containing PE reads?
stranded
Is the bam file from a strand specific protocol?
bp.coverage
a boolean that default to FALSE to decide whether coverage is to be calculated and stored by bp
...
additional arguments. See details

Value

  • An RNAseq object. The slot readCoverage contains a SimpleRleList object representing a list of coverage vectors, one per chromosome.

pkg

  • ShortRead
  • Rsamtools

Details

...

See Also

Rle ShortRead:readAligned

Examples

Run this code
library("RnaSeqTutorial")
	library(BSgenome.Dmelanogaster.UCSC.dm3)

	obj <- new('RNAseq',
		organismName="Dmelanogaster",
		readLength=36L,
		chrSize=as.list(seqlengths(Dmelanogaster))
		)
	
	obj <- fetchCoverage(
			obj,
			format="bam",
                        filename=system.file(
				"extdata",
				"ACACTG.bam",
                            	package="RnaSeqTutorial")
			)

Run the code above in your browser using DataLab